show

final Unit show(Modifier modifier, Function1<DrawScope, Unit> sketch)

Shows the canvas window and renders it for each frame repetitively. Internally, this starts the Jetpack Compose Window and renders the sketch requested by user into the Jetpack Compose Canvas Composable. The size of the Canvas will be same as the size passed in k5 method by default. One can change the canvas size and window size with the help of modifiers. In order to keep the animation running (rendering canvas continuously), it requests to run the frame of animation in nanos. All the modifier will be applied to the Canvas.

Parameters

modifier

Jetpack compose Modifier

sketch

drawScope - Compose canvas drawscope